/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package se.jocke.nbrs.service.event;

import se.jocke.nbrs.model.RestService;
import se.jocke.nbrs.model.RestServiceResponse;

/**
 *
 * @author jocke
 */
public class RestResponseEvent {

    public RestServiceResponse rsp;
    
    private RestService restService;

    public RestResponseEvent(RestServiceResponse rsp, RestService restService) {
        this.rsp = rsp;
        this.restService = restService;
    }

    public RestServiceResponse getRsp() {
        return rsp;
    }

    public RestService getRestService() {
        return restService;
    }
    

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 53 * hash + (this.rsp != null ? this.rsp.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final RestResponseEvent other = (RestResponseEvent) obj;
        if (this.rsp != other.rsp && (this.rsp == null || !this.rsp.equals(other.rsp))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "RestResponseEvent{" + "rsp=" + rsp + '}';
    }

}
